package com.eaoa.vo.pub.base;

import java.io.Serializable;

import com.eaoa.vo.pub.PubBillcode;

public class BasePubBillcode implements Serializable {
	private int hashCode = Integer.MIN_VALUE;

	private Long billcodeno;
	private String billcode;
	private String billname;
	private String islock;
	private Long currentno;

	protected void initialize() {
	}

	// Constructors

	/** default constructor */
	public BasePubBillcode() {
		initialize();
	}

	/** minimal constructor */
	public BasePubBillcode(Long billcodeno) {
		this.billcodeno = billcodeno;
		initialize();

	}

	public Long getBillcodeno() {
		return billcodeno;
	}

	public void setBillcodeno(Long billcodeno) {
		this.billcodeno = billcodeno;
	}

	public String getBillcode() {
		return billcode;
	}

	public void setBillcode(String billcode) {
		this.billcode = billcode;
	}

	public String getBillname() {
		return billname;
	}

	public void setBillname(String billname) {
		this.billname = billname;
	}

	public String getIslock() {
		return islock;
	}

	public void setIslock(String islock) {
		this.islock = islock;
	}

	public Long getCurrentno() {
		return currentno;
	}

	public void setCurrentno(Long currentno) {
		this.currentno = currentno;
	}

	public boolean equals(Object obj) {

		if (null == obj)
			return false;

		if (!(obj instanceof PubBillcode))
			return false;

		else {

			BasePubBillcode mObj = (BasePubBillcode) obj;

			if (null == this.getBillcodeno() || null == mObj.getBillcodeno())
				return false;

			else
				return (this.getBillcodeno().equals(mObj.getBillcodeno()));

		}

	}

	public int hashCode() {

		if (Integer.MIN_VALUE == this.hashCode) {

			if (null == this.getBillcodeno())
				return super.hashCode();

			else {

				String hashStr = this.getClass().getName() + ":"
						+ this.getBillcodeno().hashCode();

				this.hashCode = hashStr.hashCode();

			}

		}

		return this.hashCode;

	}

}
